<template>
	<view class="content">
		<view class="box" v-for="(item,index) in rechargeLog" :key="index">
			<view class="title">
				<text class="text">充值成功</text><br />
				<text class="txt">{{item.recharge_time}}</text>
			</view>
			<text style="font-size:26upx; margin: 46upx 20upx 0 0;">+{{item.recharge_money}}</text>
		</view>
	</view>
</template>

<script>
	import {
		get,
		post,
		showToast
	} from '../../js/common';
	export default {
		data() {
			return {
				userId: uni.getStorageSync('userId'),
				currenPage:'',
				pageSize:'',
				rechargeLog:[],
			}
		},
		onShow() {
			this.showRechargeLog()
		},
		methods: {
			showRechargeLog() {
				try {
					const params = {
						userId: this.userId,
						currenPage:1,
						pageSize:20
					}
					post("mobileapi/mobile/member/usercenter/showRechargeLog",params).then(res=>{
						this.rechargeLog = res.rechargeLog
					})
				} catch (e) {
					//TODO handle the exception
				}
			}
		}
	}
</script>

<style>
	.box {
		display: flex;
		justify-content: space-between;
		height: 160upx;
		background: #FFFFFF;
		margin: 20upx 20upx 0 20upx;
	}

	.title {
		margin: 20upx 0 0 20upx;
	}

	.text {
		font-size: 30upx;
	}

	.txt {
		color: #666666;
		font-size: 24upx;
	}
</style>
